package cn.schoolwow.workflow.domain.task;

/**任务类型*/
public enum TaskType {
    /**完成*/
    COMPLETE(0),
    /**拒绝*/
    REJECT(1);

    public int code;

    TaskType(int code) {
        this.code = code;
    }

    public static TaskType getTaskTypeByCode(int code){
        TaskType[] taskTypes = TaskType.values();
        for(TaskType taskType:taskTypes){
            if(taskType.code==code){
                return taskType;
            }
        }
        throw new IllegalArgumentException("不支持的完成任务类型!类型值:"+code);
    }
}
